<template>
    <div class="content">
        <van-cell-group  v-for="(item,index) in list" :key="index">
            <van-cell @click="detail(item)" is-link :title="item.title"/>
        </van-cell-group>
    </div>
</template>

<script>
import { yiqinggetxinfen } from '@/api/yi-qing-fang-kong.js'
export default {
  name: 'index',
  data () {
    return {
      list: []
    }
  },
  methods: {
    init () {
      yiqinggetxinfen().then(ret => {
        if (ret.data.errcode === 0) {
          console.log('.1111')
          this.list = ret.data.data.result
        }
      })
    },
    detail (data) {
      let id = data.id
      console.log(id)
      this.$router.push({
        name: 'detail',
        query: {
          'id': id,
          type: 'analysis'
        }
      })
    }
  },
  mounted () {
    this.init()
  }
}
</script>
<style scoped>
    .content >>> .van-cell{
        font-size: 14px;
        line-height: inherit;
    }
</style>
